﻿@{
    var objPrimaryKey = Model.ColumnInfos.First();
    string objKeyType = CurrentBuilder.GetNoticeType(objPrimaryKey.DataType, objPrimaryKey.IsNull);
    string objExceptSuffix = Model.TableName.Replace("_TB|_VW", "", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
}@inherits  BuildCodeViewPage<TableInfo>
using System;
using System.Text;
using System.Collections.Generic;
using TjZheng.Base;
using @(Model.Namespace).DataEntity;

namespace @(Model.Namespace).Business
{
    public partial class Biz@(Model.Name) : BizBase<@Model.Name, @CurrentBuilder.GetNoticeType(objPrimaryKey.DataType, objPrimaryKey.IsNull)>
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public Biz@(Model.Name)()
            : this(string.Empty)
        {

        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dataObjectParam">表扩展名，如：us、jp</param>
        public Biz@(Model.Name)(string dataObjectParam)
            : this(string.Empty, dataObjectParam)
        {

        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="connectionStringKey">数据库连接串</param>
        /// <param name="dataObjectParam">表扩展名，如：us、jp</param>
        public Biz@(Model.Name)(string connectionStringKey, string dataObjectParam)
            : base(connectionStringKey, "@(objExceptSuffix)_TB", "@(objExceptSuffix)_VW", dataObjectParam)
        {
            if (!string.IsNullOrWhiteSpace(dataObjectParam))
            {
                this.DbContext.TableName = string.Format("@(objExceptSuffix){0}_TB", dataObjectParam);
                this.DbContext.TableViewName = string.Format("@(objExceptSuffix){0}_VW", dataObjectParam);
            }
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="connectionStringKey">数据库连接串</param>
        /// <param name="tableName">表名</param>
        /// <param name="tableViewName">视图名</param>
        public Biz@(Model.Name)(string connectionStringKey, string tableName, string tableViewName)
            : base(connectionStringKey, tableName, tableViewName, string.Empty)
        {

        }
    }
}